<template>
  <div class="rt-option" @click.stop="handleSelect(props.value)">{{ props.label }}</div>
</template>

<script setup>
import { state } from './store'
const props = defineProps({
  label: {
    require: true,
    type: String
  },
  value: {
    require: true,
  }
})

const handleSelect = () => {
  state.showOption = false;
  state.value = props.value;
  state.label = props.label;
}
</script>
<style lang="scss" scoped>
.rt-option {
  height: 0.84rem;
  width: 100%;
  padding: 0 0.2rem;
  line-height: 0.84rem;
  font-size: 0.28rem;
  font-family: PingFangSC, PingFang SC;
  font-weight: 400;
  color: #1E1E1E;
  padding-left: 0.2rem;
}
</style>./store